import java.util.*;

/**
 * @author LKQ
 * @date 2022/6/10 23:07
 * @description Map计数，
 */
public class Solution {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNextLine()) {
            String s = sc.nextLine();
            Map<Character, Integer> map = new HashMap<>();
            int min = Integer.MAX_VALUE;
            for(char c: s.toCharArray()) {
                map.put(c, map.getOrDefault(c, 0) + 1);
            }
            for(Map.Entry<Character, Integer> entry: map.entrySet()) {
                if(entry.getValue() < min) {
                    min = entry.getValue();
                }
            }
            StringBuffer sb = new StringBuffer();
            for(char c: s.toCharArray()) {
                if (map.get(c) != min) {
                    sb.append(c);
                }
            }
            System.out.println(sb);
        }
    }
}
